package org.jeecg.modules.common.feign;

import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class ErpFeignClientFactory implements FallbackFactory<ErpFeignClient> {

    @Override
    public ErpFeignClient create(Throwable throwable) {
        JeecgSystemFallback fallback = new JeecgSystemFallback();
        fallback.setCause(throwable);
        return fallback;
    }
}
